#ifndef __DS1302_H__
#define __DS1302_H__

struct sTime {  //日期时间结构体定义
    unsigned int  year;  //年
    unsigned char mon;   //月
    unsigned char day;   //日
    unsigned char hour;  //时
    unsigned char min;   //分
    unsigned char sec;   //秒
    unsigned char week;  //星期
};

void InitDS1302();
void GetRealTime(struct sTime *time);
unsigned char DS1302SingleRead(unsigned char reg);
void DS1302BurstRead(unsigned char *dat);

void SetRealTime(struct sTime *time);

#endif
